<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>发送请求</title>
    <script src="../static/js/jquery-1.10.2.min.js"></script>
    <script>
        $(document).ready(function(){
	        $("#btn").click(function(){
		        $.post("/receives/",{
			        username:"admin",
			        pwd:"123",
			        csrfmiddlewaretoken:'{{csrf_token}}'
		        },
		        function(data,status){
			        alert("数据: \n" + data + "\n状态: " + status);
			        alert(data.msg)
		        });
	        });
        });
    </script>
</head>
<body>
    <button id="btn" type="button">发送一个请求并获取返回内容</button>
</body>
</html>